#ifndef CLIENTFRIENDLIST_H
#define CLIENTFRIENDLIST_H

#include <vector>
#include <QtCore/QString>
#include <QObject>

class Client;
class SQLConnection;
class ClientManager;

struct FriendlistElement
{
    Client *client;
    quint32 uid;
    QString loginName;
    QString nickname;
    QString status;
    bool online;
};

class ClientFriendlist : public QObject
{
    Q_OBJECT

public:
    ClientFriendlist(SQLConnection *nSQLConnection, ClientManager *clientManager, Client *owner, QObject *parent = 0);
    ~ClientFriendlist();
    Client* operator[](int i);

    void addFriend(const quint32 &uid);
    //void blockFriend(const quint32 &uid);
    //void deleteFriend(const quint32 &uid);
    //bool isFriendWith(const quint32 &uid);
    void initFriendlist();
    QString toString();

private:
    Client *m_owner;
    ClientManager *m_clientManager;
    std::vector<FriendlistElement> m_friendlist;
    SQLConnection *m_TunnelDatabase;

public slots:
};

#endif // CLIENTFRIENDLIST_H
